package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.JiFenInfo;

import java.util.List;

/**
 * Created by Hu on 2016/11/14.
 */

public class GjAdapter extends BaseQuickAdapter<JiFenInfo> {
    public GjAdapter(int layoutResId, List<JiFenInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, JiFenInfo jiFenInfo) {
            baseViewHolder.setText(R.id.jifen_item_textview,jiFenInfo.getGive_type())
                    .setVisible(R.id.jifen_time_textview,true)
                    .setText(R.id.jifen_time_textview,jiFenInfo.getRegtime())
                    .setText(R.id.jifen_num_textview,String.valueOf(jiFenInfo.getIntegral()));
    }
}
